<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设备管理</title>
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen" />
    <script src="../lib/jquery-3.3.1.min.js" type="text/javascript" ></script>
    <script src="../lib/layui/layui.js" type="text/javascript" ></script>
    <script src="../lib/xm-select.js" type="text/javascript" ></script>
    <script src="../js/cdqzsqacs/deviceMgr.js" type="text/javascript" ></script>
    <script type="text/html" id="barOperate">
        <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
    </script>
</head>
<style>
    .layui-form-select dl {
        max-height: 160px;
    }
    .layui-form-label2 {
        float: left;
        display: block;
        padding: 9px 15px;
    }
    .floor-item {
        height: 30px;
        line-height: 30px;
        font-size: 18px;
        margin-top: 5px;
    }
    .floor-item-text {
        margin-left: 10px;
    }
</style>
<body class="layui-layout-body" style="background-color:white;padding: 10px">
<div id="uploadDiv" style="display: none">
    <form class="layui-form"  id="resource_form" style="margin-top:1%">
        <input style="display: none" id="id" name="id">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">设备名称:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" lay-verify="required" name="deviceName" id="deviceName"/>
                </div>
                <label class="layui-form-label">设备编号:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" lay-verify="required" name="deviceNo" id="deviceNo"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">品牌型号:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" lay-verify="required" name="nickName" id="nickName"/>
                </div>
                <label class="layui-form-label">设备类型:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" name="typeId" id="typeId" lay-filter="typeSelect">
                        <option value="">请选择</option>
                        <option value="1">小区门禁</option>
                        <option value="2">单元门禁</option>
                        <option value="99">其他</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属小区:</label>
                <div class="layui-input-inline">
                    <select lay-verify="required" lay-filter="communityId" name="communityId" id="communityId">
                    </select>
                </div>
                <label class="layui-form-label">所属楼栋:</label>
                <div class="layui-input-inline">
                    <select name="blockId" id="blockId" lay-filter="blockId">
                    </select>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属单元:</label>
                <div class="layui-input-inline">
                    <select name="unitId" id="unitId">
                    </select>
                </div>
                <label class="layui-form-label">设备位置:</label>
                <div class="layui-input-inline">
                    <input class="layui-input" name="location" id="location" autocomplete="off" lay-verify="required"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">设备功能:</label>
                <div class="layui-input-inline">
                    <select name="sbly" id="sbly" lay-verify="required">
                        <option value="">请选择</option>
                        <option value="1">人脸抓拍</option>
                        <option value="2">视频监控</option>
                        <option value="3">一键报警柱</option>
                        <option value="4">智能门禁</option>
                        <option value="5">用电监测</option>
                        <option value="6">用水监测</option>
                        <option value="7">高空监控</option>
                        <option value="8">电动车过车设备</option>
                        <option value="9">密度摄像机</option>
                        <option value="10">访客设备</option>
                        <option value="11">车辆道闸</option>
                        <option value="12">电子围栏</option>
                        <option value="13">WIFI探针</option>
                        <option value="14">其它</option>
                    </select>
                </div>

            </div>
        </div>
        <div class='layui-input-block' >
            <button class="layui-btn" id="upload_form" lay-submit="" lay-filter="upload_form">提交</button>
            <button class="layui-btn"  id="cancel_form">取消</button>
        </div>
    </form>
</div>

<div class="layui-tab-brief" lay-filter="docDemoTabBrief">
    <div>
        <div class="layui-inline" style="margin-bottom: 10px;z-index: 2">
            <div class="layui-inline" style="width: 201px">
                <input class="layui-input" type="text" id="communitySearch" placeholder="回车搜索"/>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-xs2 floor-group" style="overflow:scroll;height: 540px;box-shadow: 0px 0px 5px #888888;">
            </div>
            <div class="layui-col-xs10">
                <fieldset class="layui-elem-field site-demo-button" >

                    <div style="margin-top:10px; height: 45px">
                        <form class="layui-form">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline">
                                        <input class="layui-input" id="searcheKey" autocomplete="off"
                                               placeholder="输入关键字搜索">
                                    </div>
                                    <div class="layui-input-inline">
                                        <select name="searchBlock" id="searchBlock" lay-filter="searchBlock">
                                            <option value="">所属楼栋</option>
                                        </select>
                                    </div>
                                    <div class="layui-input-inline">
                                        <select name="searchUnit" id="searchUnit" lay-filter="searchUnit">
                                            <option value="">所属单元</option>
                                        </select>
                                    </div>
                                    <button class="layui-btn" lay-submit="" lay-filter="queryDevice" >查询</button>
                                    <button class="layui-btn layui-btn-normal" type="button" id="syncDevice">同步设备</button>
                                    <button class="layui-btn" type="button" onclick="addDevice()">创建设备</button>
<!--                                    <button class="layui-btn"  type="button" onclick="reload()">重置</button>-->
                                </div>

                            </div>
                        </form>
                    </div>
                </fieldset>

                <div class="layui-tab-item layui-show" style="margin-left: 10px">
                    <table class="layui-hide" id="deviceTable" lay-filter="deviceTable" style="width: 100%;"></table>
                </div>

            </div>

        </div>

    </div>
</div>

</body>

</html>